package com.cjj.factory;

/**
 * @ClassName NoFactory
 * @Date 2021/07/28 17:12:43
 * @Created by ccc-j
 * @email ccc-ju@outlook.com
 */
public class NoFactory {
    public static void main(String[] args) {
        AuDi auDi = new AuDi();
        BenCi benCi = new BenCi();
        auDi.run();
        benCi.run();

        // 使用工厂模式
        Car car1 = FactoryMain.createCar("奥迪");
        Car car2 = FactoryMain.createCar("奔驰");
        car1.run();
        car2.run();
    }
}
